﻿using Microsoft.Extensions.Logging;
using System;
using System.Linq;

namespace FileLog
{
    public class FileLoggerFactory : ILoggerFactory
    {
        private readonly ILoggerProvider _loggerProvider;
        public FileLoggerFactory(ILoggerProvider provider) 
        {
            _loggerProvider = provider;
        }
        public void AddProvider(ILoggerProvider provider)
        {
            throw new NotImplementedException();
        }
       
        public ILogger CreateLogger(string categoryName)
        {
          return   _loggerProvider.CreateLogger(categoryName);
        }

        public void Dispose()
        {
            _loggerProvider.Dispose();
            GC.SuppressFinalize(this);
        }
    }
}
